package com.guard.agent.plugin;

import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.matcher.ElementMatcher;

import static net.bytebuddy.matcher.ElementMatchers.any;

public interface IPlugin {

    /**
     * 插件名称
     */
    String namespace();

    /**
     * 类匹配
     */
    ElementMatcher<? super TypeDescription> typeMatcher();

    /**
     * 方法匹配
     */
    ElementMatcher<? super MethodDescription> methodMather();

    Class getAdvice();

    /**
     * 是否添加动态字段
     */
    default boolean isAddDynamicField() {
        return false;
    }

}
